Integrand size = 19, antiderivative size = 121 \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\frac {3}{8} b \left (4 a^2+b^2\right ) x+\frac {a \left (a^2+4 b^2\right ) \sin (c+d x)}{2 d}+\frac {b \left (2 a^2+3 b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a (a+b \cos (c+d x))^2 \sin (c+d x)}{4 d}+\frac {(a+b \cos (c+d x))^3 \sin (c+d x)}{4 d} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2832, 2813} \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\frac {a \left (a^2+4 b^2\right ) \sin (c+d x)}{2 d}+\frac {b \left (2 a^2+3 b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3}{8} b x \left (4 a^2+b^2\right )+\frac {\sin (c+d x) (a+b \cos (c+d x))^3}{4 d}+\frac {a \sin (c+d x) (a+b \cos (c+d x))^2}{4 d} \]
[In]
[Out]
Rule 2813
Rule 2832
Rubi steps \begin{align*} \text {integral}& = \frac {(a+b \cos (c+d x))^3 \sin (c+d x)}{4 d}+\frac {1}{4} \int (3 b+3 a \cos (c+d x)) (a+b \cos (c+d x))^2 \, dx \\ & = \frac {a (a+b \cos (c+d x))^2 \sin (c+d x)}{4 d}+\frac {(a+b \cos (c+d x))^3 \sin (c+d x)}{4 d}+\frac {1}{12} \int (a+b \cos (c+d x)) \left (15 a b+3 \left (2 a^2+3 b^2\right ) \cos (c+d x)\right ) \, dx \\ & = \frac {3}{8} b \left (4 a^2+b^2\right ) x+\frac {a \left (a^2+4 b^2\right ) \sin (c+d x)}{2 d}+\frac {b \left (2 a^2+3 b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a (a+b \cos (c+d x))^2 \sin (c+d x)}{4 d}+\frac {(a+b \cos (c+d x))^3 \sin (c+d x)}{4 d} \\ \end{align*}
Time = 0.34 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.83 \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\frac {8 a \left (4 a^2+9 b^2\right ) \sin (c+d x)+b \left (48 a^2 c+12 b^2 c+48 a^2 d x+12 b^2 d x+8 \left (3 a^2+b^2\right ) \sin (2 (c+d x))+8 a b \sin (3 (c+d x))+b^2 \sin (4 (c+d x))\right )}{32 d} \]
[In]
[Out]
Time = 2.63 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.84
method | result | size |
derivativedivides | \(\frac {a^{3} \sin \left (d x +c \right )+3 a^{2} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(102\) |
default | \(\frac {a^{3} \sin \left (d x +c \right )+3 a^{2} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(102\) |
parallelrisch | \(\frac {48 a^{2} b d x +12 b^{3} d x +32 a^{3} \sin \left (d x +c \right )+72 \sin \left (d x +c \right ) a \,b^{2}+\sin \left (4 d x +4 c \right ) b^{3}+8 \sin \left (3 d x +3 c \right ) a \,b^{2}+24 \sin \left (2 d x +2 c \right ) a^{2} b +8 \sin \left (2 d x +2 c \right ) b^{3}}{32 d}\) | \(102\) |
parts | \(\frac {a^{3} \sin \left (d x +c \right )}{d}+\frac {b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{d}+\frac {3 a^{2} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(110\) |
risch | \(\frac {3 a^{2} b x}{2}+\frac {3 b^{3} x}{8}+\frac {a^{3} \sin \left (d x +c \right )}{d}+\frac {9 a \,b^{2} \sin \left (d x +c \right )}{4 d}+\frac {\sin \left (4 d x +4 c \right ) b^{3}}{32 d}+\frac {\sin \left (3 d x +3 c \right ) a \,b^{2}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) a^{2} b}{4 d}+\frac {\sin \left (2 d x +2 c \right ) b^{3}}{4 d}\) | \(113\) |
norman | \(\frac {\left (\frac {3}{2} a^{2} b +\frac {3}{8} b^{3}\right ) x +\left (6 a^{2} b +\frac {3}{2} b^{3}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (6 a^{2} b +\frac {3}{2} b^{3}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (9 a^{2} b +\frac {9}{4} b^{3}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {3}{2} a^{2} b +\frac {3}{8} b^{3}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {\left (8 a^{3}-12 a^{2} b +24 a \,b^{2}-5 b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (8 a^{3}+12 a^{2} b +24 a \,b^{2}+5 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (24 a^{3}-12 a^{2} b +40 a \,b^{2}+3 b^{3}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (24 a^{3}+12 a^{2} b +40 a \,b^{2}-3 b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(286\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.69 \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\frac {3 \, {\left (4 \, a^{2} b + b^{3}\right )} d x + {\left (2 \, b^{3} \cos \left (d x + c\right )^{3} + 8 \, a b^{2} \cos \left (d x + c\right )^{2} + 8 \, a^{3} + 16 \, a b^{2} + 3 \, {\left (4 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 233 vs. \(2 (109) = 218\).
Time = 0.18 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.93 \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\begin {cases} \frac {a^{3} \sin {\left (c + d x \right )}}{d} + \frac {3 a^{2} b x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {3 a^{2} b x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {3 a^{2} b \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {2 a b^{2} \sin ^{3}{\left (c + d x \right )}}{d} + \frac {3 a b^{2} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 b^{3} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 b^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 b^{3} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 b^{3} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 b^{3} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} & \text {for}\: d \neq 0 \\x \left (a + b \cos {\left (c \right )}\right )^{3} \cos {\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.79 \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\frac {24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} b - 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a b^{2} + {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} b^{3} + 32 \, a^{3} \sin \left (d x + c\right )}{32 \, d} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.79 \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\frac {b^{3} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {a b^{2} \sin \left (3 \, d x + 3 \, c\right )}{4 \, d} + \frac {3}{8} \, {\left (4 \, a^{2} b + b^{3}\right )} x + \frac {{\left (3 \, a^{2} b + b^{3}\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (4 \, a^{3} + 9 \, a b^{2}\right )} \sin \left (d x + c\right )}{4 \, d} \]
[In]
[Out]
Time = 16.29 (sec) , antiderivative size = 279, normalized size of antiderivative = 2.31 \[ \int \cos (c+d x) (a+b \cos (c+d x))^3 \, dx=\frac {\left (2\,a^3-3\,a^2\,b+6\,a\,b^2-\frac {5\,b^3}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (6\,a^3-3\,a^2\,b+10\,a\,b^2+\frac {3\,b^3}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (6\,a^3+3\,a^2\,b+10\,a\,b^2-\frac {3\,b^3}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a^3+3\,a^2\,b+6\,a\,b^2+\frac {5\,b^3}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,b\,\mathrm {atan}\left (\frac {3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (4\,a^2+b^2\right )}{4\,\left (3\,a^2\,b+\frac {3\,b^3}{4}\right )}\right )\,\left (4\,a^2+b^2\right )}{4\,d}-\frac {3\,b\,\left (4\,a^2+b^2\right )\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\frac {d\,x}{2}\right )}{4\,d} \]
[In]
[Out]